<template>
  <div class="money">
    <!-- 头部轮播图 -->
     <div class="money_head">
      <el-carousel height="150px" direction="vertical" :autoplay="true" :interval="2000" >
        <el-carousel-item >
        <h3 class="medium"><img src="../assets/money.png" width="100%" ></h3>
        </el-carousel-item>
        <el-carousel-item >
        <h3 class="medium"><img src="../assets/money.png" width="100%" ></h3>
        </el-carousel-item>
        <el-carousel-item >
        <h3 class="medium"><img src="../assets/money.png" width="100%"></h3>
        </el-carousel-item>
      </el-carousel>
    </div>
    <div class="money_first">
         <el-table :data="money" height="250" border style="width: 100%, position: relative;">
                <el-table-column prop="UserName" label="员工姓名"  min-width></el-table-column>
                <el-table-column prop="SDate"  label="发放时间" min-width></el-table-column>
                <el-table-column prop="DecreaseWages" label="加工资" min-width> </el-table-column> 
                <el-table-column  prop="increaseWages" label="扣工资"  min-width> </el-table-column>
                <el-table-column prop="BSalary" label="基本月薪" min-width></el-table-column> 
                <el-table-column prop="Salary" label="总月薪" min-width></el-table-column> 
            </el-table>
    </div>
  </div>
</template>

<script>
export default {
    data() {
      return {
      login:{},//存放登录进来的数据
      money:[],//存放工资的数据
      }
    },
    methods: {
      //获取工资信息
      Selectmoneys(){
        this.$axios({
          url:'http://localhost:9090/selectmoney',
          method:"get",
        }).then(res=>{
          this.money=(res.data.data).filter(item=>{
                return this.login.UserGH==item.UserGH
          })
          //  console.log(this.money);
        })
       
      }
    },
    mounted() {
       this.login=this.$store.state.logininfo
       this.Selectmoneys()
    },
}
</script>

<style>
.money{
    width: 100%;
    height: 540px;
    background: #fff;
   }
    /* 头部 */
   .money_head{
    width: 100%;
    height: 150px;
    margin: 0 0 50px 0;
    /* border: 1px solid #f00; */
    line-height: 55px;
    text-align: left;
   }

</style>